<?php
    include "admin_goods.php";

$id=$_REQUEST['id'];
$key=$_REQUEST['key'];
// var_dump($id);
// var_dump($key);

mysqli_select_db($conn,"shopping");

   $sql = "update goods set type='$key' where id='$id'";  //SQL模板

   $result=mysqli_query($conn,$sql);

    if (!$result){
        echo '商品分类修改失败！';
    }else{
        echo '商品分类修改成功！';
    }
    
    mysqli_close($conn);
?>
